<template>
	<view class="px-25 pt-3 border-top">
		<view style="margin-bottom: 110rpx;">
			<view v-for="(item,index) in list" :key="index">
				<view class="flex align-center mb-2 justify-between">
					<view class="flex align-center">
						<image :src="item.vcHeadImg" style="width: 64rpx;height: 64rpx;" v-if="item.vcHeadImg != ''"  mode=""></image>
						<image src="../../../../static/img/ic_default_head.png" style="width: 64rpx;height: 64rpx;" v-else mode=""></image>
						<view class="ml-2 font30 color333">{{item.vcName}}</view>
					</view>
					<view class="font26 color999">{{item.vcCreateTime}}</view>
				</view>
				<view class="font30 color666 mb-2">{{item.vcContent}}</view>
				<view class="flex-column mb-3" style="width: 100%;">
					<image :src="item.vcTpdz" style="width: 100%;" mode="aspectFill"></image>
				</view>
			</view>
		</view>	
		<view class="fixed-bottom bg-white flex align-center justify-end" style="height: 106rpx;">
			<view style="width: 286rpx;" class="mr-3">
				<main-button @click="sumit">再次提问</main-button>
			</view>
		</view>
	</view>
</template>

<script>
import mainButton from '../../../../components/common/main-buttom.vue';
export default {
	components: { mainButton },
	data() {
		return {
			list:[],
			longTopicId:""
		};
	},
	onLoad(options) {
		this.getInfo(options.id);
		this.longTopicId=options.id
		this.longToId=options.longToId
	},
	methods: {
		sumit(){
			uni.navigateTo({
				url:'../makeagain/makeagain?id='+this.longTopicId+'&longToId='+this.longToId
			})
		},
		getInfo(id) {
			let this_ = this;
			let opts = {
				url: 'Comment/CommentList.shtml'
			};
			let param = {
				topicId: id
			};
			this_.$http.httpRequest(opts, param).then(
				res => {
					console.log(res.data);
					if (res.data.code == '200') {
						this_.list = res.data.data;
					} else {
						uni.showToast({
							icon: 'none',
							title: res.data.msg
						});
					}
				},
				error => {
					console.log(error);
				}
			);
		}
	}
};
</script>

<style></style>
